Skip to content

fix(pm-console): accept Chrome's other push host, and say whether notifications reach this device - #12934

Merged
dezren39 merged 1 commit into
mainfrom
claude/pm-push-proof
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
claude/pm-push-proof

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Found by sending real notifications through the real push services with the console's own sender, not by reading the code.

What was done

Push service Subscriber Sender Result
Mozilla's subscribed the way Firefox does src/push.ts as the host runs it arrived over the network, opened whole by http_ece (a decryption that shares nothing with this code)
Mozilla's same the request made inside the Worker runtime (wrangler dev) same
Google's a real Chrome 153 with public/sw.js src/push.ts refused by our own allow-list; once fixed, Google took it (201)

What was wrong, and is fixed

  • A Chrome off the stable channel could not turn notifications on. It names jmt17.google.com (Chromium's push_messaging_constants.cc), and only fcm.googleapis.com was accepted. That host is now accepted, by exact name.
  • The Notifications screen said "On for this device" when nothing would arrive. It asked only the browser. It now asks the sender too: a device the sender refused or lost is "Not finished on this device", with one button to finish. The button is no longer left dead after a refusal.
  • Nothing said whether a notification had ever gone out. The sender keeps what came of the last one (how many devices the push services took it for, which service refused and with what status; never a device's address or key) and the screen says it in a sentence.

public/sw.js had no test; test/sw.test.ts runs the file itself. The same file was handed messages in a real Chrome the way Chrome hands them over on arrival, and showed the same notifications.

Checked

  • bun test: 193 pass. Eleven planted faults (the host left out, matched as a suffix, a refusal not recorded, "on" whatever the sender holds, the tap forgetting its screen, and six more), each caught.
  • The screen walked in a real Chrome against Google's service: off, refused, not finished, finished, test sent, "Last sent just now: a test. The push service took it for 1 device.", off.
  • All 14 screens still load clean on the test copy of the edge.

Not checked

A notification arriving on a phone. Chrome's own connection to Google's push service cannot be held from the machine this was done on, so delivery past Google's acceptance was seen only on Mozilla's service.


Generated by Claude Code


Get evidence
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ifications reach this device

Found by sending real notifications, not by reading the code.

The console's own sender was run against the real push services:

- Mozilla's: subscribed the way Firefox does, sent with src/push.ts (as
  the host runs it, and again with the request made inside the Worker
  runtime), received over the network and opened with http_ece, a
  decryption that shares nothing with this code. The message arrived
  whole both times.
- Google's: a real Chrome 153 subscribed with public/sw.js. The sender
  refused the subscription: that Chrome names jmt17.google.com, the host
  Chromium gives any Chrome off the stable channel
  (components/push_messaging/push_messaging_constants.cc), and only
  fcm.googleapis.com was accepted. With the host accepted, Google took
  the message (201).

What was wrong, and is fixed:

- A Chrome off the stable channel could not turn notifications on. Its
  host is now accepted, by exact name.
- When the sender refused or lost a device, the Notifications screen
  still said "On for this device", because it asked only the browser.
  It now asks the sender too: such a device is "Not finished on this
  device", with one button to finish, and the button is no longer left
  dead after a refusal.
- Nothing said whether a notification had ever gone out. The sender now
  keeps what came of the last one (how many devices the push services
  took it for, which service refused and with what status; never a
  device's address or key) and the screen says it in a sentence.

public/sw.js had no test. test/sw.test.ts runs the file itself: what it
shows for a message, for one it cannot read, and where a tap goes. The
same file was also handed messages in a real Chrome the way Chrome hands
them over on arrival, and showed the same notifications.

Not checked: a notification arriving on a phone. Chrome's own connection
to Google's push service cannot be held from the machine this was done
on, so delivery past Google's acceptance was seen only on Mozilla's
service.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 05:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T05:21:31.503986Z 5cafec8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9d54348c-5351-43dd-8fd2-239285624a51
Commits

Reviewing files that changed from the base of the PR and between b25daaf and 5cafec8.

Files selected for processing: 6

  • pm-stack/console/README.md
  • pm-stack/console/public/app.js
  • pm-stack/console/src/push.ts
  • pm-stack/console/test/app.test.ts
  • pm-stack/console/test/push.test.ts
  • pm-stack/console/test/sw.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit 434b7cc into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the claude/pm-push-proof branch November 23, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants